#!/usr/bin/env python3
import argparse
import os
import re
from rs_tools.RGB import extract


def main(args):
    extract(args.input, args.extension)


if __name__ == "__main__":
    parser = argparse.ArgumentParser()

    parser.add_argument(
        "--input", type=str, help="Please provide bands collection path"
    )
    parser.add_argument(
        "--R", type=str, help="Please provide an 'R' band image file(Ex. B04)"
    )
    parser.add_argument(
        "--G", type=str, help="Please provide an 'G' band image file(Ex. B03)"
    )
    parser.add_argument(
        "--B", type=str, help="Please provide an 'B' band image file(Ex. B02)"
    )
    parser.add_argument(
        "--extension",
        type=str,
        help="Please provide the output file extension(Ex. png, jpg, tiff)",
        choices=["png", "jpg", "tiff"],
    )

    args = parser.parse_args()
    main(args)
